#ifndef __LINK_LIST_H__
#define __LINK_LIST_H__

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct node_s   //链表的节点    (node——节点)
{
    int data;   //数据域，放自己封装的结构体
    struct node_s* next;    //不可以用node_t*定义
}node_t;


int create_node(node_t** pnew, int data);
int insert_from_link_by_head(node_t* phead, int data);
int insert_from_link_by_tail(node_t* phead, int data);
int insert_from_link_by_pos(node_t* phead, int pos, int data);
int delete_from_list_by_head(node_t *phead);
int delete_from_link_by_tail(node_t *phead);
int delete_from_link_by_pos(node_t* phead, int pos);
int clean_link(node_t* phead);
int destroy_link(node_t** phead);
int find_data(node_t* phead, int value);
int sort_link(node_t * phead);
int merge_link_list(node_t* phead_1, node_t** phead_2);

int show_data(node_t* phead);

#endif